package com.jt.demo8_anno;

import org.springframework.stereotype.Component;

@Component //key：pig value：反射的对象
public class Pig implements Pet{
    public Pig() {
        System.out.println("猪的无参构造");
    }

    @Override
    public void hello() {
        System.out.println("力争干掉老虎");
    }
}
